<?php
class Rol extends Modelo_base {

	var $table = 'roles';

	var $has_many = array("usuario", "permiso");

    // Validaciones de campos
    var $validation = array(
        'nombre' => array(
            'label' => 'Rol',
            'rules' => array('required', 'trim', 'max_length' => 15, 'unique')
            ),
        'es_admin' => array(
            'label' => 'Baja',
            'rules' => array('boolean')
            )
    );

    // Optionally, don't include a constructor if you don't need one.
    function __construct($id = NULL)
    {
        parent::__construct($id);
    }
}

/* End of file rol.php */
/* Location: ./application/models/rol.php */